Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth: Check if tenant is signed in before listing subscriptions #1585

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

alexweininger
Copy link
Member

Fixes an issue where if you have tenants that aren't authenticated it currently throws an error and returns no subscriptions.

Instead of just try/catching and ignoring the NotSignedIn error, I added a way to check before we throw the error at all. I did this because I have some work that builds on top of this which allows users to select an unauthenticated tenant and sign in to that tenant.

@alexweininger alexweininger requested a review from a team as a code owner September 14, 2023 16:10
Copy link
Contributor

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexweininger
Copy link
Member Author

Can you also update the README, e.g. line https://github.com/microsoft/vscode-azuretools/blob/main/auth/README.md?plain=1#L35

I didn't alter the public api. At least not yet. I will do that in a future PR when I have the pick tenant logic finished.

@alexweininger alexweininger merged commit 171a189 into main Sep 14, 2023
4 checks passed
@alexweininger alexweininger deleted the alex/gray-cheetah branch September 14, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants